﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UnityMultiPlayerGameServer.Data
{

    internal class UserData
    {
        private string accountID;
        private string userName;
        private string password;
        private bool isPrepared = false;


        #region 属性
        public string AccountID { get => accountID; set => accountID = value; }
        public string UserName { get => userName; set => userName = value; }
        public string PassWord { get => password; }
        public bool IsPrepared { get => isPrepared; set => isPrepared = value; }
        #endregion
        public UserData() { }
        public UserData(string accountID, string userName, string password)
        {
            this.accountID = accountID;
            this.userName = userName;
            this.password = password;
        }

        public GameProtocol.UserInfo ToUserInfo()
        {
            GameProtocol.UserInfo info = new GameProtocol.UserInfo();
            info.AccountID = accountID;
            info.UserName = userName;
            info.IsPrepared = isPrepared;
            return info;
        }

              
    }
}
